<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>GO机网管理后台</title>
	<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
	<link href="../../css/bootstrap.min.css" rel="stylesheet">
	<link href="css/nifty.min.css" rel="stylesheet">
	<link href="../../css/demo/nifty-demo-icons.min.css" rel="stylesheet">
	<link href="../../plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<link href="../../plugins/pace/pace.min.css" rel="stylesheet">
	<script src="../../plugins/pace/pace.min.js?2016/8/5"></script>
	<script src="../../js/jquery-2.2.1.min.js"></script>
	
	<style>
		#table div{
			padding: 5px;
			margin: 0;
			color: #757575;
		}
		td{
			vertical-align: middle!important;
			
		}
		.panel.active{
			border-color: #2ac845;
		}
	</style>
</head>
<body id="main">
<div id="container" class="effect mainnav-lg">
	@@include('public/header.html')
	<div class="boxed">
		<div id="content-container">
			
			<div id="page-title" style="position: relative">
				<h1 class="page-header text-overflow">入驻申请审核</h1>
			</div>
			
			<div id="page-content">
				<div id="page-wrapper">
					<button value="" v-on:click="loadOrder(1);" class="btn btn-default" v-bind:class="{active:type=='1'}">滴滴工程师</button>
					<button value="0" v-on:click="loadOrder(2);" class="btn btn-default" v-bind:class="{active:type=='2'}">城市合伙人</button>
					<button value="0" v-on:click="loadOrder(3);" class="btn btn-default" v-bind:class="{active:type=='3'}">联盟商户</button>
				</div>
				
				<div class="col-sm-12 pad-btm pad-top">
					<table class="table table-striped" id="table">
						<tr v-for="o in orders">
							<td width="220">
								<div><span>申请时间：</span><span v-text="o.m_date"></span></div>
								<div><span>申请城市：</span><span v-text="o.city"></span></div>
								<div><span>申请人：</span><span v-text="o.username"></span></div>
								<div><span>性别：</span><span v-text="gender[o.sex]"></span></div>
							</td>
							<td width="250">
								<div><span>手机号码：</span><span v-text="o.phone"></span></div>
								<div><span>微信号：</span><span v-text="o.wx_access"></span></div>
								<div><span>身份证号：</span><span v-text="o.idcard"></span></div>
								<div><span>工龄：</span><span v-text="o.working_age"></span></div>
							</td>
							<td width="250">
								<div><span>资质简介：</span><span v-text="o.introduce"></span></div>
							</td>
							<td width="200">
								<div><span>身份证正面照片：</span><a class="btn btn-default" target="_blank" href="{{o.idcard_front}}">查看</a></div>
								<div><span>身份证背面照片：</span><a class="btn btn-default" target="_blank" href="{{o.idcard_contrary}}">查看</a></div>
								<div v-if="o.business_license"><span>营业执照照片：</span><a class="btn btn-default" target="_blank" href="{{o.business_license}}">查看</a></div>
								<div v-if="o.store_photo"><span>门店照片：</span><a class="btn btn-default" target="_blank" href="{{o.store_photo}}">查看</a></div>
							</td>
						</tr>
						<tr v-if="orders.length==0">
							<td colspan="4" style="text-align: center"><h4>没有申请信息</h4></td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		
		<nav id="mainnav-container">
			@@include('public/left_menu.html')
		</nav>
	</div>
	
	
	<!-- 指派弹窗（Modal） -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h4 class="modal-title" id="myModalLabel">分配师傅</h4>
				</div>
				<div class="modal-body" style="text-align: center;">
					<validator name="validation">
						<span>请选择接单师傅：</span>
						<select v-model="engineer" v-validate:engineer="{required: true}" style="min-width: 150px;">
							<option v-for="e in engineers" value="{{e.member_id}}" v-text="e.m_name"></option>
						</select>
					</validator>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" id="addBrand" :disabled="!$validation.valid" v-on:click="assignOrder();">确定分配</button>
				</div>
			</div>
		</div>
	</div>

</div>
@@include('public/footer.html')

<script src="../../plugins/vue/vue.min.js"></script>
<script src="js/vue-validator.min.js"></script>
<script src="../../js/base.js"></script>
<script>
	var vue = new Vue({
		el:"#main",
		data:{
			orders:[],
			recycleStatus:recycleStatus,
			currentOrder:null,
			engineers:null,
			engineer:null,
			type:"1",
			gender:["", "男" , "女"]
		},
		methods:{
			/*根据状态加载订单*/
			loadOrder:function(type){
				this.type = type;
				$.get(apiRecycle+"index.php?m=Home&c=Index&a=get_apply_account",{
					page:0,
					type:type
				},function(res){
					vue.orders = res.data;
				}, "json");
			}
		},
		ready:function(){
			this.loadOrder(1);
		}
	});
</script>
</body>
</html>
